from functools import wraps


def mydec(func):
    @wraps(func)
    def mywrap(*args, **kwargs):
        print('hello this is decorator1')
        print(args)
        print(kwargs)
        func(*args, **kwargs)
    return mywrap


@mydec
def helloWorld():
    print('hello, world')


helloWorld()

#
#
# import math
# def pow(x, n):
#     return math.pow(x, n)
#
#
# print(pow(2, 3))

def A(fuc):
    print("这是 A")
    print(fuc())

@A
def B():
    print("这是 B")


# B()